<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>fastText: /data/users/cpuhrsch/fbsource/fbcode/deeplearning/fastText/src/fasttext.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="favicon.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">fastText
   &#160;<span id="projectnumber">d00d36476b15</span>
   </div>
   <div id="projectbrief">Fast text processing tool/library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('fasttext_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">fasttext.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="fasttext_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#ifndef FASTTEXT_FASTTEXT_H</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#define FASTTEXT_FASTTEXT_H</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="fasttext_8h.html#a74036bd705019bb33643e90202bf343e">   13</a></span>&#160;<span class="preprocessor">#define FASTTEXT_VERSION 11 </span><span class="comment">/* Version 1a */</span><span class="preprocessor"></span></div><div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="fasttext_8h.html#af5de14588083ef853a2863c8d625ee24">   14</a></span>&#160;<span class="preprocessor">#define FASTTEXT_FILEFORMAT_MAGIC_INT32 793712314</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &lt;time.h&gt;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &lt;atomic&gt;</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &lt;set&gt;</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="args_8h.html">args.h</a>&quot;</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="dictionary_8h.html">dictionary.h</a>&quot;</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="matrix_8h.html">matrix.h</a>&quot;</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="qmatrix_8h.html">qmatrix.h</a>&quot;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="model_8h.html">model.h</a>&quot;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="real_8h.html">real.h</a>&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="utils_8h.html">utils.h</a>&quot;</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="vector_8h.html">vector.h</a>&quot;</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacefasttext.html">fasttext</a> {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classfasttext_1_1FastText.html">   33</a></span>&#160;<span class="keyword">class </span><a class="code" href="classfasttext_1_1FastText.html">FastText</a> {</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;  <span class="keyword">private</span>:</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classfasttext_1_1FastText.html#adb5bfe8d98e11ae5dd3498f9ee4829ee">   35</a></span>&#160;    std::shared_ptr&lt;Args&gt; <a class="code" href="classfasttext_1_1FastText.html#adb5bfe8d98e11ae5dd3498f9ee4829ee">args_</a>;</div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classfasttext_1_1FastText.html#a2f5648d532a7ff4f46ac425197082422">   36</a></span>&#160;    std::shared_ptr&lt;Dictionary&gt; <a class="code" href="classfasttext_1_1FastText.html#a2f5648d532a7ff4f46ac425197082422">dict_</a>;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="classfasttext_1_1FastText.html#aa25683f12eed057c159fd11fd3a55efb">   38</a></span>&#160;    std::shared_ptr&lt;Matrix&gt; <a class="code" href="classfasttext_1_1FastText.html#aa25683f12eed057c159fd11fd3a55efb">input_</a>;</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classfasttext_1_1FastText.html#a48ba03fda3c2cceef301b24b5a2c2b38">   39</a></span>&#160;    std::shared_ptr&lt;Matrix&gt; <a class="code" href="classfasttext_1_1FastText.html#a48ba03fda3c2cceef301b24b5a2c2b38">output_</a>;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classfasttext_1_1FastText.html#aa4f1d5f2269feee25ae8119bc8e778c4">   41</a></span>&#160;    std::shared_ptr&lt;QMatrix&gt; <a class="code" href="classfasttext_1_1FastText.html#aa4f1d5f2269feee25ae8119bc8e778c4">qinput_</a>;</div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="classfasttext_1_1FastText.html#a62ad59060370a16588e407ce3ffebfaa">   42</a></span>&#160;    std::shared_ptr&lt;QMatrix&gt; <a class="code" href="classfasttext_1_1FastText.html#a62ad59060370a16588e407ce3ffebfaa">qoutput_</a>;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classfasttext_1_1FastText.html#a4b599ce1e4fa1dedae97bd7fad225cb8">   44</a></span>&#160;    std::shared_ptr&lt;Model&gt; <a class="code" href="classfasttext_1_1FastText.html#a4b599ce1e4fa1dedae97bd7fad225cb8">model_</a>;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="classfasttext_1_1FastText.html#af34de232baec78782ede73041209dd7b">   46</a></span>&#160;    std::atomic&lt;int64_t&gt; <a class="code" href="classfasttext_1_1FastText.html#af34de232baec78782ede73041209dd7b">tokenCount</a>;</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classfasttext_1_1FastText.html#a70fdc2b9419ebdb3a3adb582b713ecce">   47</a></span>&#160;    clock_t <a class="code" href="classfasttext_1_1FastText.html#a70fdc2b9419ebdb3a3adb582b713ecce">start</a>;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#afe7b85dd466c4ccef45e4c590edae585">signModel</a>(std::ostream&amp;);</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classfasttext_1_1FastText.html#a7a874ab83984dc05dca56a74edae25c1">checkModel</a>(std::istream&amp;);</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="classfasttext_1_1FastText.html#aeb75b28c20c01110cfcf807a518076c8">   51</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classfasttext_1_1FastText.html#aeb75b28c20c01110cfcf807a518076c8">quant_</a>;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;  <span class="keyword">public</span>:</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <a class="code" href="classfasttext_1_1FastText.html#a3f1c81aafc45ad71824b332f5cb577d5">FastText</a>();</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#ace850e40405e56ab488d32f25e5d3533">getVector</a>(<a class="code" href="classfasttext_1_1Vector.html">Vector</a>&amp;, <span class="keyword">const</span> std::string&amp;) <span class="keyword">const</span>;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#a64fc781f7e3e60a3794562a03477398f">saveVectors</a>();</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#adbe7666386c0d7cb9017fa641e391b9f">saveOutput</a>();</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#a3bc5bf68cf6e1f487fa57ddc750f2099">saveModel</a>();</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#ae0e6922404294aabbb9d6322e6f464cd">loadModel</a>(std::istream&amp;);</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#ae0e6922404294aabbb9d6322e6f464cd">loadModel</a>(<span class="keyword">const</span> std::string&amp;);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#adb757902284f53288aa41a5ae45e001f">printInfo</a>(<a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>, <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#a3c56524cdccf6f9d23b75460bbea5d5f">supervised</a>(<a class="code" href="classfasttext_1_1Model.html">Model</a>&amp;, <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>, <span class="keyword">const</span> std::vector&lt;int32_t&gt;&amp;,</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;                    <span class="keyword">const</span> std::vector&lt;int32_t&gt;&amp;);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#a592036d3a8ae545637db4864dbe5274f">cbow</a>(<a class="code" href="classfasttext_1_1Model.html">Model</a>&amp;, <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>, <span class="keyword">const</span> std::vector&lt;int32_t&gt;&amp;);</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#aa1855802a2a1f2f1398fdad79f73b66a">skipgram</a>(<a class="code" href="classfasttext_1_1Model.html">Model</a>&amp;, <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>, <span class="keyword">const</span> std::vector&lt;int32_t&gt;&amp;);</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    std::vector&lt;int32_t&gt; <a class="code" href="classfasttext_1_1FastText.html#a06fbfe68049942cab56eb85ebb2ca4d9">selectEmbeddings</a>(int32_t) <span class="keyword">const</span>;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#aa01f053de2afa22056c594d96988c1ad">quantize</a>(std::shared_ptr&lt;Args&gt;);</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#af13c347cb7dde5fea3b0122f029a0b5b">test</a>(std::istream&amp;, int32_t);</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#a831dff689fbc2af4f93c91ee1bde7e95">predict</a>(std::istream&amp;, int32_t, <span class="keywordtype">bool</span>);</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#a831dff689fbc2af4f93c91ee1bde7e95">predict</a>(</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        std::istream&amp;,</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        int32_t,</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        std::vector&lt;std::pair&lt;real, std::string&gt;&gt;&amp;) <span class="keyword">const</span>;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#a1a5d918e595e00a8ea7b9bc5ac8f6c35">wordVectors</a>();</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#a39efb50f61237890cbf2e30b7a516618">sentenceVectors</a>();</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#a62a84e26a04b64eb35edfa110dd8dc32">ngramVectors</a>(std::string);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#aadb72a552ff01b6d6efe9b161ad8dd49">textVectors</a>();</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#a74e01ba3737bd625bf0602fb808b1501">printWordVectors</a>();</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#af4d659c58cd72b67f5cc0cce2c1925cf">printSentenceVectors</a>();</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#ace82dc820d98f504af16b8b8c501a6f4">precomputeWordVectors</a>(<a class="code" href="classfasttext_1_1Matrix.html">Matrix</a>&amp;);</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#a5c8825c522415d89478a54ecf28642c9">findNN</a>(<span class="keyword">const</span> <a class="code" href="classfasttext_1_1Matrix.html">Matrix</a>&amp;, <span class="keyword">const</span> <a class="code" href="classfasttext_1_1Vector.html">Vector</a>&amp;, int32_t,</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                <span class="keyword">const</span> std::set&lt;std::string&gt;&amp;);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#a5509f491ca6c2fa3e57bc3443536f885">nn</a>(int32_t);</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#a34e7fade7f758870ffcd28015555ba74">analogies</a>(int32_t);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#a1b6d83563616330a64d6db4921e835f1">trainThread</a>(int32_t);</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#a7430c17374a28e7f1fd50a9c86ac659b">train</a>(std::shared_ptr&lt;Args&gt;);</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1FastText.html#a9e503be304e98ead00a2eaed3127f64a">loadVectors</a>(std::string);</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classfasttext_1_1FastText.html#a32a93e0bc4389be11aa4be0990a9e010">getDimension</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;};</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;}</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="classfasttext_1_1FastText_html_aadb72a552ff01b6d6efe9b161ad8dd49"><div class="ttname"><a href="classfasttext_1_1FastText.html#aadb72a552ff01b6d6efe9b161ad8dd49">fasttext::FastText::textVectors</a></div><div class="ttdeci">void textVectors()</div><div class="ttdef"><b>Definition:</b> fasttext.cc:402</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a4b599ce1e4fa1dedae97bd7fad225cb8"><div class="ttname"><a href="classfasttext_1_1FastText.html#a4b599ce1e4fa1dedae97bd7fad225cb8">fasttext::FastText::model_</a></div><div class="ttdeci">std::shared_ptr&lt; Model &gt; model_</div><div class="ttdef"><b>Definition:</b> fasttext.h:44</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_af4d659c58cd72b67f5cc0cce2c1925cf"><div class="ttname"><a href="classfasttext_1_1FastText.html#af4d659c58cd72b67f5cc0cce2c1925cf">fasttext::FastText::printSentenceVectors</a></div><div class="ttdeci">void printSentenceVectors()</div><div class="ttdef"><b>Definition:</b> fasttext.cc:422</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a3c56524cdccf6f9d23b75460bbea5d5f"><div class="ttname"><a href="classfasttext_1_1FastText.html#a3c56524cdccf6f9d23b75460bbea5d5f">fasttext::FastText::supervised</a></div><div class="ttdeci">void supervised(Model &amp;, real, const std::vector&lt; int32_t &gt; &amp;, const std::vector&lt; int32_t &gt; &amp;)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:257</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a3bc5bf68cf6e1f487fa57ddc750f2099"><div class="ttname"><a href="classfasttext_1_1FastText.html#a3bc5bf68cf6e1f487fa57ddc750f2099">fasttext::FastText::saveModel</a></div><div class="ttdeci">void saveModel()</div><div class="ttdef"><b>Definition:</b> fasttext.cc:93</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_ace850e40405e56ab488d32f25e5d3533"><div class="ttname"><a href="classfasttext_1_1FastText.html#ace850e40405e56ab488d32f25e5d3533">fasttext::FastText::getVector</a></div><div class="ttdeci">void getVector(Vector &amp;, const std::string &amp;) const</div><div class="ttdef"><b>Definition:</b> fasttext.cc:28</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a62a84e26a04b64eb35edfa110dd8dc32"><div class="ttname"><a href="classfasttext_1_1FastText.html#a62a84e26a04b64eb35edfa110dd8dc32">fasttext::FastText::ngramVectors</a></div><div class="ttdeci">void ngramVectors(std::string)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:388</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html"><div class="ttname"><a href="classfasttext_1_1FastText.html">fasttext::FastText</a></div><div class="ttdef"><b>Definition:</b> fasttext.h:33</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a9e503be304e98ead00a2eaed3127f64a"><div class="ttname"><a href="classfasttext_1_1FastText.html#a9e503be304e98ead00a2eaed3127f64a">fasttext::FastText::loadVectors</a></div><div class="ttdeci">void loadVectors(std::string)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:551</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_af34de232baec78782ede73041209dd7b"><div class="ttname"><a href="classfasttext_1_1FastText.html#af34de232baec78782ede73041209dd7b">fasttext::FastText::tokenCount</a></div><div class="ttdeci">std::atomic&lt; int64_t &gt; tokenCount</div><div class="ttdef"><b>Definition:</b> fasttext.h:46</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a62ad59060370a16588e407ce3ffebfaa"><div class="ttname"><a href="classfasttext_1_1FastText.html#a62ad59060370a16588e407ce3ffebfaa">fasttext::FastText::qoutput_</a></div><div class="ttdeci">std::shared_ptr&lt; QMatrix &gt; qoutput_</div><div class="ttdef"><b>Definition:</b> fasttext.h:42</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a5c8825c522415d89478a54ecf28642c9"><div class="ttname"><a href="classfasttext_1_1FastText.html#a5c8825c522415d89478a54ecf28642c9">fasttext::FastText::findNN</a></div><div class="ttdeci">void findNN(const Matrix &amp;, const Vector &amp;, int32_t, const std::set&lt; std::string &gt; &amp;)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:443</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a592036d3a8ae545637db4864dbe5274f"><div class="ttname"><a href="classfasttext_1_1FastText.html#a592036d3a8ae545637db4864dbe5274f">fasttext::FastText::cbow</a></div><div class="ttdeci">void cbow(Model &amp;, real, const std::vector&lt; int32_t &gt; &amp;)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:266</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a06fbfe68049942cab56eb85ebb2ca4d9"><div class="ttname"><a href="classfasttext_1_1FastText.html#a06fbfe68049942cab56eb85ebb2ca4d9">fasttext::FastText::selectEmbeddings</a></div><div class="ttdeci">std::vector&lt; int32_t &gt; selectEmbeddings(int32_t) const</div><div class="ttdef"><b>Definition:</b> fasttext.cc:194</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a5509f491ca6c2fa3e57bc3443536f885"><div class="ttname"><a href="classfasttext_1_1FastText.html#a5509f491ca6c2fa3e57bc3443536f885">fasttext::FastText::nn</a></div><div class="ttdeci">void nn(int32_t)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:467</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a32a93e0bc4389be11aa4be0990a9e010"><div class="ttname"><a href="classfasttext_1_1FastText.html#a32a93e0bc4389be11aa4be0990a9e010">fasttext::FastText::getDimension</a></div><div class="ttdeci">int getDimension() const</div><div class="ttdef"><b>Definition:</b> fasttext.cc:645</div></div>
<div class="ttc" id="model_8h_html"><div class="ttname"><a href="model_8h.html">model.h</a></div></div>
<div class="ttc" id="namespacefasttext_html"><div class="ttname"><a href="namespacefasttext.html">fasttext</a></div><div class="ttdef"><b>Definition:</b> args.cc:17</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a3f1c81aafc45ad71824b332f5cb577d5"><div class="ttname"><a href="classfasttext_1_1FastText.html#a3f1c81aafc45ad71824b332f5cb577d5">fasttext::FastText::FastText</a></div><div class="ttdeci">FastText()</div><div class="ttdef"><b>Definition:</b> fasttext.cc:26</div></div>
<div class="ttc" id="classfasttext_1_1Vector_html"><div class="ttname"><a href="classfasttext_1_1Vector.html">fasttext::Vector</a></div><div class="ttdef"><b>Definition:</b> vector.h:23</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a1b6d83563616330a64d6db4921e835f1"><div class="ttname"><a href="classfasttext_1_1FastText.html#a1b6d83563616330a64d6db4921e835f1">fasttext::FastText::trainThread</a></div><div class="ttdeci">void trainThread(int32_t)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:511</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a34e7fade7f758870ffcd28015555ba74"><div class="ttname"><a href="classfasttext_1_1FastText.html#a34e7fade7f758870ffcd28015555ba74">fasttext::FastText::analogies</a></div><div class="ttdeci">void analogies(int32_t)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:483</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_af13c347cb7dde5fea3b0122f029a0b5b"><div class="ttname"><a href="classfasttext_1_1FastText.html#af13c347cb7dde5fea3b0122f029a0b5b">fasttext::FastText::test</a></div><div class="ttdeci">void test(std::istream &amp;, int32_t)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:297</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a7a874ab83984dc05dca56a74edae25c1"><div class="ttname"><a href="classfasttext_1_1FastText.html#a7a874ab83984dc05dca56a74edae25c1">fasttext::FastText::checkModel</a></div><div class="ttdeci">bool checkModel(std::istream &amp;)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:72</div></div>
<div class="ttc" id="utils_8h_html"><div class="ttname"><a href="utils_8h.html">utils.h</a></div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_ae0e6922404294aabbb9d6322e6f464cd"><div class="ttname"><a href="classfasttext_1_1FastText.html#ae0e6922404294aabbb9d6322e6f464cd">fasttext::FastText::loadModel</a></div><div class="ttdeci">void loadModel(std::istream &amp;)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:140</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a70fdc2b9419ebdb3a3adb582b713ecce"><div class="ttname"><a href="classfasttext_1_1FastText.html#a70fdc2b9419ebdb3a3adb582b713ecce">fasttext::FastText::start</a></div><div class="ttdeci">clock_t start</div><div class="ttdef"><b>Definition:</b> fasttext.h:47</div></div>
<div class="ttc" id="classfasttext_1_1Model_html"><div class="ttname"><a href="classfasttext_1_1Model.html">fasttext::Model</a></div><div class="ttdef"><b>Definition:</b> model.h:38</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_aeb75b28c20c01110cfcf807a518076c8"><div class="ttname"><a href="classfasttext_1_1FastText.html#aeb75b28c20c01110cfcf807a518076c8">fasttext::FastText::quant_</a></div><div class="ttdeci">bool quant_</div><div class="ttdef"><b>Definition:</b> fasttext.h:51</div></div>
<div class="ttc" id="real_8h_html"><div class="ttname"><a href="real_8h.html">real.h</a></div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a74e01ba3737bd625bf0602fb808b1501"><div class="ttname"><a href="classfasttext_1_1FastText.html#a74e01ba3737bd625bf0602fb808b1501">fasttext::FastText::printWordVectors</a></div><div class="ttdeci">void printWordVectors()</div><div class="ttdef"><b>Definition:</b> fasttext.cc:418</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a7430c17374a28e7f1fd50a9c86ac659b"><div class="ttname"><a href="classfasttext_1_1FastText.html#a7430c17374a28e7f1fd50a9c86ac659b">fasttext::FastText::train</a></div><div class="ttdeci">void train(std::shared_ptr&lt; Args &gt;)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:591</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a64fc781f7e3e60a3794562a03477398f"><div class="ttname"><a href="classfasttext_1_1FastText.html#a64fc781f7e3e60a3794562a03477398f">fasttext::FastText::saveVectors</a></div><div class="ttdeci">void saveVectors()</div><div class="ttdef"><b>Definition:</b> fasttext.cc:39</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_adbe7666386c0d7cb9017fa641e391b9f"><div class="ttname"><a href="classfasttext_1_1FastText.html#adbe7666386c0d7cb9017fa641e391b9f">fasttext::FastText::saveOutput</a></div><div class="ttdeci">void saveOutput()</div><div class="ttdef"><b>Definition:</b> fasttext.cc:55</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a39efb50f61237890cbf2e30b7a516618"><div class="ttname"><a href="classfasttext_1_1FastText.html#a39efb50f61237890cbf2e30b7a516618">fasttext::FastText::sentenceVectors</a></div><div class="ttdeci">void sentenceVectors()</div><div class="ttdef"><b>Definition:</b> fasttext.cc:368</div></div>
<div class="ttc" id="matrix_8h_html"><div class="ttname"><a href="matrix_8h.html">matrix.h</a></div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a831dff689fbc2af4f93c91ee1bde7e95"><div class="ttname"><a href="classfasttext_1_1FastText.html#a831dff689fbc2af4f93c91ee1bde7e95">fasttext::FastText::predict</a></div><div class="ttdeci">void predict(std::istream &amp;, int32_t, bool)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:338</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_aa4f1d5f2269feee25ae8119bc8e778c4"><div class="ttname"><a href="classfasttext_1_1FastText.html#aa4f1d5f2269feee25ae8119bc8e778c4">fasttext::FastText::qinput_</a></div><div class="ttdeci">std::shared_ptr&lt; QMatrix &gt; qinput_</div><div class="ttdef"><b>Definition:</b> fasttext.h:41</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a48ba03fda3c2cceef301b24b5a2c2b38"><div class="ttname"><a href="classfasttext_1_1FastText.html#a48ba03fda3c2cceef301b24b5a2c2b38">fasttext::FastText::output_</a></div><div class="ttdeci">std::shared_ptr&lt; Matrix &gt; output_</div><div class="ttdef"><b>Definition:</b> fasttext.h:39</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_aa25683f12eed057c159fd11fd3a55efb"><div class="ttname"><a href="classfasttext_1_1FastText.html#aa25683f12eed057c159fd11fd3a55efb">fasttext::FastText::input_</a></div><div class="ttdeci">std::shared_ptr&lt; Matrix &gt; input_</div><div class="ttdef"><b>Definition:</b> fasttext.h:38</div></div>
<div class="ttc" id="vector_8h_html"><div class="ttname"><a href="vector_8h.html">vector.h</a></div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_adb5bfe8d98e11ae5dd3498f9ee4829ee"><div class="ttname"><a href="classfasttext_1_1FastText.html#adb5bfe8d98e11ae5dd3498f9ee4829ee">fasttext::FastText::args_</a></div><div class="ttdeci">std::shared_ptr&lt; Args &gt; args_</div><div class="ttdef"><b>Definition:</b> fasttext.h:35</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_ace82dc820d98f504af16b8b8c501a6f4"><div class="ttname"><a href="classfasttext_1_1FastText.html#ace82dc820d98f504af16b8b8c501a6f4">fasttext::FastText::precomputeWordVectors</a></div><div class="ttdeci">void precomputeWordVectors(Matrix &amp;)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:430</div></div>
<div class="ttc" id="args_8h_html"><div class="ttname"><a href="args_8h.html">args.h</a></div></div>
<div class="ttc" id="namespacefasttext_html_a7afdad102f318271c14154b8e65e5ea3"><div class="ttname"><a href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">fasttext::real</a></div><div class="ttdeci">float real</div><div class="ttdef"><b>Definition:</b> real.h:15</div></div>
<div class="ttc" id="classfasttext_1_1Matrix_html"><div class="ttname"><a href="classfasttext_1_1Matrix.html">fasttext::Matrix</a></div><div class="ttdef"><b>Definition:</b> matrix.h:23</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_aa1855802a2a1f2f1398fdad79f73b66a"><div class="ttname"><a href="classfasttext_1_1FastText.html#aa1855802a2a1f2f1398fdad79f73b66a">fasttext::FastText::skipgram</a></div><div class="ttdeci">void skipgram(Model &amp;, real, const std::vector&lt; int32_t &gt; &amp;)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:283</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_adb757902284f53288aa41a5ae45e001f"><div class="ttname"><a href="classfasttext_1_1FastText.html#adb757902284f53288aa41a5ae45e001f">fasttext::FastText::printInfo</a></div><div class="ttdeci">void printInfo(real, real)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:178</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a1a5d918e595e00a8ea7b9bc5ac8f6c35"><div class="ttname"><a href="classfasttext_1_1FastText.html#a1a5d918e595e00a8ea7b9bc5ac8f6c35">fasttext::FastText::wordVectors</a></div><div class="ttdeci">void wordVectors()</div><div class="ttdef"><b>Definition:</b> fasttext.cc:359</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_a2f5648d532a7ff4f46ac425197082422"><div class="ttname"><a href="classfasttext_1_1FastText.html#a2f5648d532a7ff4f46ac425197082422">fasttext::FastText::dict_</a></div><div class="ttdeci">std::shared_ptr&lt; Dictionary &gt; dict_</div><div class="ttdef"><b>Definition:</b> fasttext.h:36</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_aa01f053de2afa22056c594d96988c1ad"><div class="ttname"><a href="classfasttext_1_1FastText.html#aa01f053de2afa22056c594d96988c1ad">fasttext::FastText::quantize</a></div><div class="ttdeci">void quantize(std::shared_ptr&lt; Args &gt;)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:208</div></div>
<div class="ttc" id="classfasttext_1_1FastText_html_afe7b85dd466c4ccef45e4c590edae585"><div class="ttname"><a href="classfasttext_1_1FastText.html#afe7b85dd466c4ccef45e4c590edae585">fasttext::FastText::signModel</a></div><div class="ttdeci">void signModel(std::ostream &amp;)</div><div class="ttdef"><b>Definition:</b> fasttext.cc:86</div></div>
<div class="ttc" id="dictionary_8h_html"><div class="ttname"><a href="dictionary_8h.html">dictionary.h</a></div></div>
<div class="ttc" id="qmatrix_8h_html"><div class="ttname"><a href="qmatrix_8h.html">qmatrix.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="fasttext_8h.html">fasttext.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
